package QL;

import java.util.List;
import java.util.ArrayList;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ButlerRoomData implements IQLResponse
{
    /// <summary>
    /// 房间ID
    /// </summary>
    public long RoomID;

    /// <summary>
    /// 血池
    /// </summary>
    public long HP;

    /// <summary>
    /// 库存值
    /// </summary>
    public long Inventory;

    /// <summary>
    /// 彩金奖池
    /// </summary>
    public long GoldScore;

    /// <summary>
    /// 总输赢
    /// </summary>
    public long WinLose;

    /// <summary>
    /// 当日总输赢
    /// </summary>
    public long CurrentWinLose;

    public String gameName;

    public Long gameId;

    public String getGameName() {
        return gameName;
    }

    public void setGameName(String gameName) {
        this.gameName = gameName;
    }

    public Long getGameId() {
        return gameId;
    }

    public void setGameId(Long gameId) {
        this.gameId = gameId;
    }

    @Override
    public void DeserializeFromJson(JSONObject jsonObj)
    {
        JSONObject t = jsonObj;
        if (t.has("roomi_d"))
            RoomID = t.getLong("roomi_d");
        if (t.has("h_p"))
            HP = t.getLong("h_p");
        if (t.has("inventory"))
            Inventory = t.getLong("inventory");
        if (t.has("gold_score"))
            GoldScore = t.getLong("gold_score");
        if (t.has("win_lose"))
            WinLose = t.getLong("win_lose");
        if (t.has("current_win_lose"))
            CurrentWinLose = t.getLong("current_win_lose");
    }
}
